#ifndef _INPUTEVENTCTRL_H_
#define _INPUTEVENTCTRL_H_


#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/input.h>
#include <sys/epoll.h>
#include <string.h>


struct epoll_event;

class InputEventCtrl 
{
public:
    static int aaa;
    InputEventCtrl();
    ~InputEventCtrl();

    bool init();
    void run();
	void (*inputEventDeal)(int type, int code, int value);
    bool addAepollFile(const char* filename);
    


private:
    int m_epfd;
    int m_kdfd;
    int m_msfd;

    void doInput(const epoll_event* ev);


    #define MAX_EVENTS 20
    struct epoll_event ev;
    struct epoll_event events[MAX_EVENTS];
    char buffer[sizeof(input_event)];

};


#endif // _INPUTEVENTCTRL_H_